home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / snpd1292.zip / DELSRCH.H < prev    next >
Text File  |  1992-12-26  |  1KB  |  59 lines

  1. /*
  2.      Header:      DelSrch (File Delete Search)
  3.      Version:     1.00  02-Apr-1989
  4.      Language:    ANSI C with MS-DOS extensions
  5.  
  6.      This module will search subdirectories for files to be deleted. It can
  7.      query the user as to which files selected should be deleted.
  8.  
  9.      Written by Scott Robert Ladd. No rights reserved.
  10. */
  11.  
  12. #if !defined(FILESRCH_H)
  13. #define FILESRCH_H 1
  14.  
  15. #if defined(_MSC) || defined(_QC) || defined(__WATCOMC__)
  16.     #pragma pack(1)
  17. #endif
  18.  
  19. typedef
  20.   struct
  21.     {
  22.     char     reserved[21];
  23.     char     attrib;
  24.     unsigned time;
  25.     unsigned date;
  26.     long     size;
  27.     char     name[13];
  28.     }
  29.   FILE_DATA;
  30.  
  31. #if defined(_MSC) || defined(_QC) || defined(__WATCOMC__)
  32.     #pragma pack()
  33. #endif
  34.  
  35. /* attribute bit masks */
  36.  
  37. #define ATTR_READONLY   0x01 /* read only */
  38. #define ATTR_HIDDEN     0x02 /* hidden */
  39. #define ATTR_SYSTEM     0x04 /* system */
  40. #define ATTR_VOLABEL    0x08 /* volume label */
  41. #define ATTR_DIRECTORY  0x10 /* directory */
  42. #define ATTR_ARCHIVE    0x20 /* archive */
  43. #define ATTR_ALL        0x3F /* all files */
  44.  
  45. /* prototypes */
  46.  
  47. void sub_find(char * spec,
  48.               char attrib,
  49.               char * top_dir,
  50.               void (* handler)(char * dir, FILE_DATA * fd));
  51.  
  52. int wild_match(char * name, char * tmpl);
  53.  
  54. int find_first(char * spec, char attrib, FILE_DATA * fd);
  55.  
  56. int find_next(FILE_DATA * fd);
  57.  
  58. #endif
  59.